/*
 * contourAffinage.h
 *
 *  Created on: 3 mars 2014
 *      Author: pierre
 */

#ifndef CONTOURAFFINAGE_H_
#define CONTOURAFFINAGE_H_

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/gpu/gpu.hpp>

#include <math.h>

const int distanceRaccord = 6;
const int seuilCanny  = 60;
const int longProprePoly = 5;
const float angleRupture = 0.5;
const float distanceAD = 0.20;


struct Contour
{
	int id;
	float ratioAD;
};


class contourAffinage
{
	public:

	//contourAffinage();
	static std::vector<std::vector<cv::Point> > approxPoly(std::vector<std::vector<cv::Point> > cont);
	static std::vector<std::vector<cv::Point> > raccord(std::vector<std::vector<cv::Point> > cont);
	static std::vector<Contour > calculeTauxAD(std::vector<std::vector<cv::Point> > cont);
};

#endif /* CONTOURAFFINAGE_H_ */
